<?php

class Wechat {
    const APPID = "wx9d3bcbc548ed81fe";

    const SECRET_KEY = "ea0e2d762ec35ff38fd5d917f8f1fad8";

	    // 商户ID
    const MCH_ID = '1510351701';
    // 商户秘钥
    const MCH_KEY = 'C7E40F37B5374C504C14C254E1596B83';
}

class ErrorCode {
    /**
    * error code 说明.
    * <ul>
    *    <li>-41001: encodingAesKey 非法</li>
    *    <li>-41003: aes 解密失败</li>
    *    <li>-41004: 解密后得到的buffer非法</li>
    *    <li>-41005: base64加密失败</li>
    *    <li>-41016: base64解密失败</li>
    * </ul>
    */
    public static $OK = 0;

    public static $IllegalAesKey = -41001;

    public static $IllegalIv = -41002;

    public static $IllegalBuffer = -41003;

	public static $DecodeBase64Error = -41004;

}

class AliCloud {

    const PIC_MAX_SIZE = 4019372;

    const ENDPOINT   = "http://oss-cn-hangzhou.aliyuncs.com";

    const BUCKET_URL = "https://qdhimgs.oss-cn-hangzhou.aliyuncs.com/";

    const BUCKET_NAME = "qdhimgs";

    const OSS_ACCESSKEYID = "LTAIlRiRGLPFx4o0";

    const OSS_ACCESSKEYSECRET = "7ptjn2NpAfjiPqPytsxKnYldspNKDp";
}

class ThridPart {
    // 分销系统URL
    const THRID_URL = 'http://b2b.51huandao.com/';
    // 账户ID
    const CUST_ID   = 1503437;
    // 秘钥
    const API_KEY   = '63DE8DCA347CC6931E910406B5B62AD1';
    // 第三方支付返回值
    const THRID_CODE =[
        'success' => 1,

        'failed'  => 0
    ];
}

class ProjectConst {
    // 项目状态
    const PROJECT_STATUS = [
        // 下架
        'off' => 0,
        // 上架
        'on'  => 1
    ];
}

class OrderConst {


    // 下单返回值
    const THRID_RESULT_STATUS = [
        'success' => 1
    ];

    // 订单接口code
    const API_ORDER_STATUS = [

        'missing'    => 4002,

        'success'    => 4001,

        'unrefound'  => 4003,

        'failed'     => 4000,

        'permission' => 4006

    ];

    // 小程序返回值
    const API_RESULT_STATUS = [
        // 下单失败
        'failed'  => 9000,
        // 下单成功
        'success' => 9001,
        // 商品不存在
        'missing' => 9002,
    ];

    // 订单状态
    const ORDER_STATUS = [
        // 审核中
        'pending' => 0,
        // 待支付
        'wating'  => 1,
        // 已支付
        'finish'  => 2,
        // 已取消
        'cancel'  => 3,
        // 已过期 
        'expire'  => 4,
        // 已拒绝出票
        'applyRejected' => 5,
        // 退票申请中
        'refoundApply'  => 6,
        // 已退票
        'refind' => 7,
        // 已拒绝退票
        'refoundRejected' => 8,
        // 已出票
        'published' => 9,
        // 退票确认中
        'refoundConfirming' => 10,
        // 已使用
        'used' => 11
    ];

}

